<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <meta property="og:image"content="{{ url_for('static', filename='img/celestra_square.jpg')}}" />
    <title>{% block title%}The Monitor Celestra{% endblock %}</title>
    <link href="/static/css/bootstrap-2.0.2.min.css" rel="stylesheet" />
    <link href="/static/css/bootstrap-responsive-2.0.2.min.css" rel="stylesheet" />
    <link href="/static/css/main.css" rel="stylesheet" />
    <link rel="shortcut icon" href="/static/img/favicon.ico" />
    <link rel="image_src" type="image/jpeg" href="http://www.celestra-larp.com/static/img/celestra_square.jpg" />
    {% block style_block %}<!-- page-specific CSS -->{% endblock %}
    <script src="/static/js/lib/modernizr-2.5.3.min.js"></script><!-- Modernizr must be here, above body tag. -->
    {% block head_script %}<!-- defer-incapable JS block -->

    {% endblock %}

</head>

<body>
<a name="top" class="noshow"></a>
<div id="tubular" class="clearfix">
    {% block header %}
    <div id="header">
        {% include 'includes/nav.html' %} {# pull in navbar #}
    </div>
    {% endblock header %}
	<!-- main content area -->
<div id="wrapp">
	<div class="container" id="maincontent">
		<!-- flash content -->
		<div class="row">
		{% include 'includes/flash_message.html' %} {# page-level feedback notices #}
		</div>
		
		<div id="body_content">
		{% block content %}

		{% endblock content %}
	    </div>
    </div>
</div>
    <footer>
        <div id="footer" class="container">
            {% block footer %}
            <!-- footer -->
            <div class="row">
            <div class="span12">
            <p>Battlestar Galactica is copyright to <a href="http://www.nbciuni.com/">NBC Universal</a> and <a href="http://www.syfy.com/">Syfy Channel</a>. 
            This project is an UNOFFICIAL non-profit fan event inspired by the TV-series.</p>
            </div>
            </div>
            {% endblock %}
        </div><!-- /footer -->
    </footer>
</div>

	<a href="#top" class="btn btn-navbar back_to_top">
		<span>​</span>​
	</a>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="/static/js/lib/bootstrap-2.0.3.min.js"></script>
    <script src="/static/js/main.js"></script>

    <script src="/static/js/jquery.tubular.1.0.js"></script>
	<script src="https://raw.github.com/flesler/jquery.scrollTo/master/jquery.scrollTo.min.js"></script>

<script>
	$('document').ready(function() {
	
		$(document).scroll(function(e){ 
			if($("a[name='story']").length && $(document).scrollTop()+100 > $("a[name='story']").position().top && !$(".nav:visible").legnth){
				$(".back_to_top").fadeIn();
			} else if($("a[name='story']").length && $(document).scrollTop()+100 < $("a[name='story']").position().top && $(".nav:visible")){
				$(".back_to_top").fadeOut();
			}
		});



		$(".btn.internal").click(function(e){
			e.preventDefault();
			$.scrollTo($("a[name='" + $(this).attr("href").substr(1) + "']"),200);
		});
// Form functions

$(".event input").change(function(){
	$(".game").slideUp(); 
	$( "." + $(this).val() ).slideDown(); 

});

	$.get("/signup/availability/", function(data){ 
		$.each(data, function(k,v){ 
			$.each(v, function(i,n){ 
				$("#" + n[0])
					.text(n[1])
					.parents(".game")
					.removeClass("subdued")
					.children("input")
					.attr("disabled", (n[1] < 1)); 
			}); 
		}); 
	});

		$(".error-boubble").popover('show');
	});
</script>
    {% block tail_script %}
	<!-- defer-capable JS block -->
	{% endblock %}
</body>
</html>

